Recent image forming apparatuses sometimes operate in an energy save mode in which energy consumption is reduced, for example, by stopping electric supply to devices that are not currently in use. Japanese Patent Application Publication No. 2004-248047 describes an image forming apparatus provided with a light sensor capable of detecting the intensity of ambient light. When the light intensity detected by the light sensor is below a predetermined value, the image forming apparatus operates in the energy save mode. When the light intensity detected by the light sensor reaches the predetermined value, the image forming apparatus is switched from the energy save mode to a waiting mode. In this manner, energy consumption can be reduced when the room is dark such as when nobody is in the office. Further, as the image forming apparatus is switched to the waiting mode when the room becomes lighter, the image forming apparatus starts warming up to prepare for image forming operation.